<?php
class Control_ServerList_download {
 	function download() {
 		$s_id  = MooForm::request('s_id');	
 		
 		$serverListDao = MooDao::get('Serverlist');
 		$serverListObj = $serverListDao->load($s_id);
 		
 		if(empty($serverListObj)) {
 			exit("id not exist");
 		}
 		
 		$game 	  = $serverListObj->s_game;
 		$platfrom = $serverListObj->s_platform;
 		$filename = $serverListObj->s_filename;
 		
 		$downName = "{$game}_{$platfrom}_$filename";
 		$formatFile = ROOT_PATH . "/servistLists/{$game}_{$platfrom}_$filename";
 		
 		MooUtil::downFile($formatFile, $downName);
 	}
 		
}
